<?php

/**
 * @author NgAnh
 * @copyright 2013
 */
class AnwerRelationmodel extends CI_Model {
    var $template_id;
    var $question_id;
    var $attribute;
    var $value;
    var $created_by_user_id;
    var $created_on_date;
    var $last_modified_by_user_id;
    var $last_modified_on_date;
    
    function __construct()
    {
        // Call the Model constructor
        $this->load->database();
    }
    function create($tid, $qid, $att, $val, $userid, $date){
        $data = array(
                'template_id' => $tid,
                'question_id' => $qid,
                'attribute' => $att,
                'value' => $val,
                'created_by_user_id' => $userid,
                'created_on_date' => $date
            );
        $this->db->insert('sur_answer_relation', $data);
    }   
}
?>